package com.cloud.service;

import com.cloud.common.domain.Result;
import com.cloud.common.domain.vo.SvgParam;
import com.cloud.utils.ServiceConstants;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Feign服务调用
 * 附件模块
 */
@Component
@FeignClient(value = ServiceConstants.TlxxModulesAnnex)
public interface FeignAnnexService {

    /**
     * 查询上传附件路径
     *
     * @param fileName
     * @return
     */
    @LoadBalanced
    @RequestMapping(value = "/annexAction/inAuth/getInAnnexUrl")
    public Result<String> getInAnnexUrl(@RequestParam(value = "fileName") String fileName);

    /**
     * 根据SVG地址转化PNG地址
     *
     * @param svgParam
     * @return
     */
    @LoadBalanced
    @PostMapping(value = "/annexAction/inAuth/svgInvertUrl")
    public Result<String> svgInvertUrl(@RequestBody SvgParam svgParam);

}
